package laxproxy

import (
	"fmt"
	"time"
)

// / 角色基本信息
type RoleBasicInfo struct {
	RoleId   uint64
	RoleName string
}

func (ptr *RoleBasicInfo) ToString() string {
	return fmt.Sprintf("%d,%s", ptr.RoleId, ptr.RoleName)
}

type ClientProtocolNode struct {
	ProtoId   uint32
	ProtoName string
	ProtoArg  string
	ProtoRes  string
	/// 超时(PTC此字段为0)
	Timeout time.Duration
}

// / @Desc: web请求,返回的结构
type WebReplyNode struct {
	code int
	msg  []byte
}

// @Desc: 请求发送消息节点
type WebSendMsgNode struct {
	/// 要返回的数据
	ch chan *WebReplyNode
	/// 角色uid
	RoleUid uint64
	/// 协议id
	ProtoId uint32
	/// 发送的消息内容
	SendMsg []byte
}

type ServerReplyNode struct {
	/// 角色uid
	RoleUid uint64
	/// 协议id
	ProtoId uint32
	/// 发送的消息内容
	ReplyMsg []byte
}
